-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add hoe #254
Add hoe #254
Conversation
fluffyloafie
commented
Dec 8, 2023
•
edited
Loading
edited
- Dirt -> Farmland
- Coarsed -> Dirt
- Rooted -> Dirt + drop Roots
Deploying with Cloudflare Pages
|
From cauldron to hanging roots (blockID/itemID problem)
1a50c31
to
f7a350d
Compare
@@ -1032,6 +1032,15 @@ void Player::_onPlayerAction(protocol::PlayerAction &pck) | |||
Event::cancelBlockDestroy(this, this->getDimension()->getLevel().getChunkColumnFromBlockPos(pck.location.x, pck.location.z).getBlock(pck.location), pck.location); | |||
return; | |||
} | |||
auto item = this->_inventory->hotbar().at(this->_heldItem).getUsableItemFromSlot(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to be improved to handle multiple items.
if (usedItem->_usabilityType == Items::UsabilityType::RightMouseClickUsable) { | ||
usedItem->onUse(this->getDimension(), pck.location); | ||
this->_inventory->hotbar().at(this->_heldItem).updateDamage(); | ||
if (Items::Hoe *usedItem = std::get_if<Items::Hoe>(&item)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to be improved to handle multiple items.
break; | ||
} | ||
|
||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be removed when the generation offset is fixed.